let logFn:Function|null = null;
export const initLogger = (val:Function)=>{
	logFn = val;
}

const logger = (...args : any[]) => {
	if (logFn) {
		logFn(...args);
		return;
	}
	if (window?.console) {
		console.log(...args);
	}
}

export default logger;